# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: l0gic
# Contributor: 0xAA <0xaa@dmg.sx>

pkgname=cgasm
pkgver=1.0.0
pkgrel=4
pkgdesc='CLI tool for browsing documentation for x86 Assembly'
arch=(loong64 x86_64)
url='https://github.com/bnagy/cgasm'
license=(GPL2)
makedepends=(git go)
source=("git+$url#tag=v$pkgver")
sha256sums=('SKIP')

build() {
  cd $pkgname
  CGO_CPPF= GO111MODULE=off go build -v -trimpath -buildmode=pie -ldflags="-s -w -linkmode external -extldflags \"$LDFLAGS\""
}

package() {
  install -D -m755 $pkgname/$pkgname "$pkgdir/usr/bin/$pkgname"
}
